home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software of the Month Club 2000 October
/
Software of the Month - Ultimate Collection Shareware 277.iso
/
pc
/
PROGRAMS
/
UTILITY
/
WINLINUX
/
DATA1.CAB
/
programs_-_usrdoc
/
WU-FTPD-.{2P
/
FIXES-2_.{12
< prev
next >
Wrap
Text File
|
1999-09-17
|
9KB
|
189 lines
This is a lot of changes to wu-ftpd 2.4.2 beta 18, largely for future
portability - i.e. to make it easier to move to new systems and to
defend itself against C9X. It also includes a few enhancements. Not
all of the changes have been fully tested, but they have been built and
the ftpd tested under HI-UX/WE2, HI-OSF/1-MJ, HI-UX/MPP and SGI Irix 6.4
and 6.5. It has also been compiled under Debian Linux (1.3.1), Solaris
2.5, HP-UX 9.03, Digital Unix 3.2 and Ultrix 4.3 and partially tested
under the first.
Note that I regard full testing as execution of EVERY conditional and
EVERY path, and so is much more rigorous than is nowadays common. I
have tested the changes at least much as most vendors do to their
software before full release :-(
Here is a summary of the changes:
1) The makefiles are built differently, in that the system-dependent
ones contain ONLY the system-dependent settings and the dependencies and
rules are appended to the end. This has not been done to the top level
makefiles, as the installation process is so system-dependent (and just
plain messy) anyway.
This was done because it made it feasible to sort out various minor
problems. For example, Emacs backups (*~ files) were being removed from
only some directories, and the previous scripts would not rebuild if
only headers had been changed. The latter could also be done by
makedepend, if that had been included, but this method is simpler and
more reliable.
VR10: His changes were incomplete and, in many cases, incorrect. I've
fixed the errors and finished his work.
2) Some fixes were put into the HI-UX/WE2 configuration, and one
for HI-UX/MPP and HI-OSF/1-MJ added. These are wildly different, and
so should not share a set.
3) All logging messages in src/ftpd.c that contain a source
identification have been updated to include the authenticated user, if
available. This makes the RFC 931 option actually worthwhile! This
accounts for the largest number of lines changed, but the changes are
very routine.
VR10: Finished up his work to bring it up to VR10 patch level. No way
he could have known about all the new log messages unless he was using
VR9.
4) Some near-trivial changes to the authentication code (mainly
src/authenticate.h and support/authuser.c), to improve RFC 931
selection, which is site- rather than system-dependent. A comment has
been put into config.h to indicate this.
5) access.c and ftpcount.c failed to compile with a standard
compiler on a system with K&R <unistd.h> headers, because 'pid_t *' and
'char *' are not compatible. Weeble.
VR10: On _his_ so-called 'standard' compiler. Worked fine on others.
The changes were correct, though.
6) The old K&R equivalence between int and void functions finally
breaks in C9X, so that has been kludged up, mainly in src/ftpcmd.y. It
was pretty dubious in C89, but not actually forbidden - it is a
constraint error in C9X.
VR10: What he's saying here is the code wasn't up to ANSI-C standards
but the current (1998) standard allows it for compatability while the
forthcoming standard may not. The changes should be there for general
clarity regardless of the state of the C standard.
7) popen.c assumed that SVR4 and _OSF_SOURCE would never be set
together; well, they can be ....
VR10: Probably a good idea, but I get the impression all his work is
largely to support a new platform and has little or nothing to do with
the forthcoming C standard.
8) glob.c had a breach of the type rules so obscure that it had me
staring at the code for an hour wondering why the compiler was
diagnosing an apparently correct statement. It was right.
VR10: Change is dubious at best. He's really complaining that the target
he was compiling on didn't handle char-to-int like others the daemon runs
on.
9) Some occurrences of 'return; break;' have had the break commented
out, to reduce the number of warnings about unreachable code. This may
introduce them on other machines, but I think the changed state will be
quieter. Both sets of code are correct.
VR10: Bah! Dead code is dead code and if a compiler doesn't like it being
removed, that's the compiler's problem.
10) Some extremely ancient configuration and makefile options were
changed to correspond with the systems and compilers now used - Digital
Unix needed most changes. I find it difficult to believe that nobody
has reported that they were incompatible with version 3.2, as the
current version is 4.something.
VR10: DEC users were complaining. Noone was listening. VR9 already had
all his changes.
11) Several HP-specific hacks were given a name and set in the config
files, as they are needed for Hitachi systems, too.
12) The lack of utmpx was given a name and set in the config files,
as there are now half a dozen such systems.
VR10: Probable Hitachi-ism.
13) Some cases of implicit int on variables were fixed up. While
these remain correct, they have been deprecated practice for years.
14) The STUPID_SPRINTF hack has been made standard, because it works
in all cases,the efficiency loss is negligible, and it clarifies the
code considerably.
VR10: VR9 already had most of his clean-up. All he did was make this the
normal case and remove the old, broken single-call case.
15) The horrible <sys/time.h> hack was given a name and set in the
config files. Heaven alone knows why Linux and Hitachi systems are the
only ones that seem to need it!
VR10: Dunno why Hitachi does, but Linux needs it because of their lame
#include layout.
16) Some cases where exit was used to return from main were changed
to return, as that produces less messages and is somewhat cleaner.
17) Some comments on how to set the syslog facility and pathnames
have been put into config.h. The facility could be set there if the
src/config/config.* were modified to default FACILITY after the
inclusion of config.h rather than before.
18) I added a USE_USR to src/pathnames.h for the systems that use
/usr/adm.
19) I edited config.h and src/config/config.* to allow the paths to
be specified centrally, if a site wants to use a different convention,
but the result was so horrible that I backed off. This area needs
some improvement.
20) One H* change has the effect of printing the local name twice in
the transfer log, instead of the local and remote user. It doesn't
appear to have any useful effect, so I have commented it out.
21) The default buffer sizes used for binary transfers are far too
low for efficiency on many systems, so I have added an option to specify
the buffer size directly, and commented it in config.h.
VR10: Read 'many' as 'Hitachi' here. This change fixes the malloc()
problem on AIX, though.
22) The code has been fixed to print file sizes as double, and not as
long, because **** C9X breaks the traditional rule that long is the
longest integer type. Yes, I really do mean that C9X intends to change
the language sufficiently that it is not possible to write portable
file-handling code that will work correctly in both C89 and C9X, let
alone K&R.
Furthermore, the previous code will ALREADY print wrong answers on some
systems for files of above 2^31 bytes, so radical changes were
essential. Also, src/extensions.c had a serious bug, where it assumed
that (struct stat).st_size was compatible with an int, and nobody seems
to have noticed. It did the same for time_t, too :-(
The code that I have written is a LOT cleaner, and MUCH more portable,
but does assume not-totally-broken floating-point - it doesn't need -lm.
There used to be some completely knotted systems, but I haven't heard of
any in over a decade. The efficiency is irrelevant, as it is only a few
conversions per transfer.
WARNING: this will give approximate (but NOT misleading) results if any
system can create files whose sizes cannot be held in a double without
loss of precision. While the C89 and C9X standards permit this, I don't
know of any systems that are so deficient. There is NO other way to
resolve this problem even remotely reliably in advance of being able to
assume C9X. I thought of adding yet more preprocessor conditionals, but
the spaghetti was bad enough already, and the double kludge is extremely
safe in practice.
VR10: His changes were lame and stupid. What he found was that the
format strings for size_t and time_t were incorrect on some systems. The
code already knew that. He was confused by the STUPID_SPRINTF functions.
VR9 cleaned all that up considerably. I've changed his stuff back to the
original, then used the correct format strings (L_FORMAT and T_FORMAT) in
the printf() statements. He'll need to add a test for his C-199x compiler
on his Hitachi box and set the proper format strings in ftpd.c and
extensions.c